The present invention relates to a data storage method, a ternary inner product operation circuit, a semiconductor device including the same, and a ternary inner product arithmetic processing program.
In recent years, an electronic control system installed in a vehicle includes an image recognition processor that recognizes images taken by a camera or the like. The electronic control system determines, for example, whether an obstacle is approaching based on the result of the recognition by the image recognition processor to perform an automatic control or the like of the brake.
The image recognition processor creates quantized data (so-called feature amount data) based on the array of pixel data obtained from an input image. The image recognition processor creates, for example, a histogram in which a direction component of an edge image obtained from the input image is indicated for each angle (histogram of oriented gradients) as the feature amount data. The image recognition processor then carries out an inner product operation of the feature amount data that is created and dictionary data obtained by machine learning in advance to determine whether the input image includes an object to be detected based on the result of the inner product operation.
It is required in the image recognition processor to process the inner product operation with high accuracy at high speed in order to improve the processing performance of the electronic control system.
According to the configuration in which the inner product operation is carried out using floating point type data for the purpose of improving the accuracy, however, the processing speed decreases. Meanwhile, according to the configuration in which the inner product operation is carried out using binary data represented by 1 and 0 for the purpose of improving the processing speed, the accuracy decreases.
In recent years, development of an image recognition processor that carries out an inner product operation using data represented by ternary values of +1, 0, and −1 (hereinafter also referred to as ternary data) has been advancing. According to the configuration that carries out the inner product operation using the ternary data, it is possible to improve the accuracy compared to the case in which the inner product operation is carried out using the binary data and to improve the processing speed compared to the case in which the inner product operation is carried out using the floating point type data. The operation of the ternary data is also disclosed, for example, in Japanese Unexamined Patent Application Publication No. 2002-14804.